$(function() {
    var userlogouturl = '/user/douserlogout';
    //提交
    $('#logout').click(function() {
        $.ajax({
            // url : (isEdit? editShopUrl:addShopUrl),
            url : userlogouturl,
            type : 'POST',
            // contentType: "application/x-www-form-urlencoded; charset=utf-8",
            contentType : false,
            processData : false,
            cache : false,
            success : function(data) {
                if (data.success) {
                    $('.logoutsuccess').click();
                    window.setTimeout("window.location='/community/index'",1000);
                } else {
                    $('.fail-message').html("请再次尝试");
                    $('.modal-title').html("失败");
                    $('.logoutsuccess').click();
                }
            }
        });
    });

});